﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using EShop.Core;
using EShop.Core.Model.Store;

namespace EShop.Services.Store
{
    public interface IOrderService
    {
        /// <summary>
        /// 查询定单
        /// </summary>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <param name="fiter"></param>
        /// <returns></returns>
        IPagedList<Order> GetAllOrder(int pageIndex, int pageSize, int orderState = -1);
        /// <summary>
        /// 获取一条定单信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Order GetOrderById(int id);

        /// <summary>
        /// 删除定单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteOrder(int id);
        /// <summary>
        /// 修改定单
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool UpdateOrder(Order model);

        List<Order> GetAllOrder(int userId, bool showHidden = false);

        int CreateOrder(Order model);

        bool CreateOrderMore(OrderMore model);

        List<Order> GetOrderByFiter(string ordernum);

        OrderMore GetOrderMoreById(int id);

        string GetOrderNumbernew();
    }
}
